using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Magia_i_miecz
{

    public partial class Gra : Form
    {
        Image mapa;


        public Gra()
        {
            InitializeComponent();
        }

        private void nowaGraToolStripMenuItem_Click(object sender, EventArgs e)
        {
            nowaGra();


        }

        private void mapa_DragOver(object sender, DragEventArgs e)
        {
          //  e.X;
        }

        private void zoomInButton_Click(object sender, EventArgs e)
        {
            zoom_in();
        }

        private void edytorKartToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Edytor ed = new Edytor();
            ed.Show();
        }
        void zoom_in()
        {
            if (mapaImage.Width <= 10000 && mapaImage.Height <= 10000)
            {
                mapaImage.Width += (int)(0.2*mapaImage.Width);
                mapaImage.Height += (int)(0.2*mapaImage.Height);
            }
        }
        void zoom_out()
        {
            if (mapaImage.Width >= 100 && mapaImage.Height >= 100)
            {
                mapaImage.Width -= (int)(0.2 * mapaImage.Width);
                mapaImage.Height -= (int)(0.2 * mapaImage.Height);
            }
        }

        private void ZoomOutButton_Click(object sender, EventArgs e)
        {
            zoom_out();
        }

        private void mapaImage_MouseWheel(object sender, MouseEventArgs e)
        {
            bool minus=false;
            int ile=e.Delta;
            if (e.Delta < 0)
            {
                minus = true;
                ile = -e.Delta;
            }

                if(minus)
                zoom_out();
                else zoom_in();

               

        }
    }


    public class mapaClass
    {



    }
    public class opisPola
    {
        //sasiad lewy
        //sasiad prawy
        //sasiad z gory
        //sasiad z dolu


    }
}